<?php


namespace app\admin\model;


use think\facade\Db;

class UserModel
{
    public function select($where = []){
        $select=Db::name('admin')->where($where)->paginate(15);
//        echo Db::name('admin')->getLastSql();exit;
        return $select;
    }
    public function add($data){
        $add = Db::name('admin')->insert($data);
        return $add;
    }
    public function find($id){
        $find=Db::name('admin')->find($id);
        return $find;
    }
    public function edit($where = []){
        $edit=Db::name('admin')->where($where)->update();
        return $edit;
    }
    public function del($id){
        $del=Db::name('admin')->delete($id);
        return $del;
    }
}